package com.zd.service.lmpl;/**
 * @Description: DeparturelistServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-07
 * @Version:v1.0
 */

import com.zd.mapper.DeparturelistMapper;
import com.zd.service.lnter.DeparturelistServicelnter;
import com.zzg.entity.Departurelist;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: DeparturelistServicelmpl
 * @Author:pioneer
 * @Date: 2021-07-07
 * @Version:v1.0
 */
@Service
public class DeparturelistServicelmpl implements DeparturelistServicelnter {
    @Autowired
    private DeparturelistMapper departurelistMapper;
    /**
     * 查询运单列表相关的所有信息
     *
     * @return 运单列表集合
     */
    @Override
    public List<Departurelist> selectDeparturelist() {
        return departurelistMapper.selectDeparturelist();
    }

    /**
     * 分页查询运单列表相关的所有信息
     *
     * @param page  页码
     * @param entry 条目数
     * @return 运单列表集合
     */
    @Override
    public List<Departurelist> pagingqueryDeparturelist(int page, int entry) {
        return departurelistMapper.pagingqueryDeparturelist ((page-1)*entry,entry);
    }

    /**
     * 通过运单id查询运单所有信息
     *
     * @param checkenumber 运输单号
     * @return 运单列表对象
     */
    @Override
    public Departurelist getDeparturelistByid(String checkenumber) {
        return departurelistMapper.getDeparturelistByid (checkenumber);
    }

    /**
     * 通过多条件查询运单列表信息
     *
     * @param departurelist 运单列表对象
     * @return 运单列表集合
     */
    @Override
    public List<Departurelist> getDeparturelistcondition(Departurelist departurelist) {
        return departurelistMapper.getDeparturelistcondition (departurelist);
    }

    /**
     * 通过多条件查询运单列表信息并分页
     * @param departurelist 运单列表对象
     * @param page 页码
     * @param entry 条目数
     * @return 运单列表集合
     */
    @Override
    public List<Departurelist> conditionqueryDeparturelist(Departurelist departurelist, int page, int entry) {
        return departurelistMapper.conditionqueryDeparturelist (departurelist,(page-1)*entry,entry);
    }
}
